<?php

namespace App\Http\Controllers;

use App\Library\Requests\SalesRecord\SalesRecordPageRequest;
use App\Library\Service\SalesRecordService;
use Illuminate\Http\JsonResponse;

class SalesRecordController extends BaseController
{
    /**
     * @param SalesRecordService $service
     */
    public function __construct(SalesRecordService $service)
    {
        $this->service = $service;
    }

    /**
     * 分页
     * @param SalesRecordPageRequest $request
     * @return JsonResponse
     *
     */
    public function paging(SalesRecordPageRequest $request): JsonResponse
    {
        return $this->service->paging($request);
    }

    /**
     * 统计
     * @return JsonResponse
     *
     */
    public function tj(): JsonResponse
    {
        return $this->service->tj();
    }
}
